﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<DTO.Models.MEDIA>>" %>
<%
    string domaincms = ConfigurationManager.AppSettings["domaincms"];
    DTO.Models.MEDIA obj1 = null;
    DTO.Models.MEDIA obj2 = null;
    DTO.Models.MEDIA obj3 = null;
    DTO.Models.MEDIA obj4 = null;

    foreach (var item in Model)
    {
        if (item.TypeMediaName.CompareTo("introtuvan1") == 0)
        {
            obj1 = item;
        }
        if (item.TypeMediaName.CompareTo("introtuvan2") == 0)
        {
            obj2 = item;
        }
        if (item.TypeMediaName.CompareTo("introtuvan3") == 0)
        {
            obj3 = item;
        }
        if (item.TypeMediaName.CompareTo("introtuvan4") == 0)
        {
            obj4 = item;
        }
    }
%>
<div>
    <div class="dung-col2 dung-other dung-left">
        <div class="dung-section-title-other dung-text-center">
            <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan1/") %>'>
                <%= ConfigurationManager.AppSettings["tuvan1"] %></a></div>
        <div class="dung-section">
            <div class="dung-section-content-other">
                <div class="dung-section-content-image">
                    <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan1/") %>'>
                        <img src="<%= Url.Content(domaincms + "/MediaImage/" + obj1.ID.ToString()+ ".jpg") %>" width="357" height="192" alt="<%= ConfigurationManager.AppSettings["tuvan1"] %>" />
                    </a>
                </div>
                <div>
                    <p><%= obj1.Intro %></p>
                </div>
                <div class="dung-text-right">
                    <a href="<%= Url.Content("~/Tuvan/xemtuvan/tuvan1/") %>">Chi tiết >> </a>
                </div>
            </div>
        </div>
    </div>
    <div class="dung-col2 dung-other dung-right">
        <div class="dung-section-title-other dung-text-center">
            <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan2/") %>'>
                <%= ConfigurationManager.AppSettings["tuvan2"] %></a></div>
        <div class="dung-section">
            <div class="dung-section-content-other">
                <div class="dung-section-content-image">
                    <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan2/") %>'>
                        <img src="<%= Url.Content(domaincms + "/MediaImage/" + obj2.ID.ToString()+ ".jpg") %>" width="357" height="192" alt="<%= ConfigurationManager.AppSettings["tuvan2"] %>" />
                    </a>
                </div>
                <div>
                    <p><%= obj2.Intro %></p>
                </div>
                <div class="dung-text-right">
                    <a href="<%= Url.Content("~/Tuvan/xemtuvan/tuvan2/") %>">Chi tiết >> </a>
                </div>
            </div>
        </div>
    </div>
    <div class="clearer">
        &nbsp;</div>
</div>
<div>
    <div class="dung-col2 dung-other dung-left">
        <div class="dung-section-title-other dung-text-center">
            <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan3/") %>'>
                <%= ConfigurationManager.AppSettings["tuvan3"] %></a></div>
        <div class="dung-section">
            <div class="dung-section-content-other">
                <div class="dung-section-content-image">
                    <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan3/") %>'>
                        <img src="<%= Url.Content(domaincms + "/MediaImage/" + obj3.ID.ToString() + ".jpg") %>" width="357" height="192" alt="<%= ConfigurationManager.AppSettings["tuvan3"] %>" />
                    </a>
                </div>
                <div>
                    <p><%= obj3.Intro %></p>
                </div>
                <div class="dung-text-right">
                    <a href="<%= Url.Content("~/Tuvan/xemtuvan/tuvan3/") %>">Chi tiết >> </a>
                </div>
            </div>
        </div>
    </div>
    <div class="dung-col2 dung-other dung-right">
        <div class="dung-section-title-other dung-text-center">
            <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan4/") %>'>
                <%= ConfigurationManager.AppSettings["tuvan4"] %></a></div>
        <div class="dung-section">
            <div class="dung-section-content-other">
                <div class="dung-section-content-image">
                    <a href='<%= Url.Content("~/Tuvan/xemtuvan/tuvan4/") %>'>
                        <img src="<%= Url.Content(domaincms + "/MediaImage/" + obj4.ID.ToString() + ".jpg") %>" width="357" height="192" alt="<%= ConfigurationManager.AppSettings["tuvan4"] %>" />
                    </a>
                </div>
                <div>
                    <p><%= obj4.Intro %></p>
                </div>
                <div class="dung-text-right">
                    <a href="<%= Url.Content("~/Tuvan/xemtuvan/tuvan4/") %>">Chi tiết >> </a>
                </div>
            </div>
        </div>
    </div>
    <div class="clearer">
        &nbsp;</div>
</div>
